import request from "@/Http/request"

//用户登录
export const UserLogin=async(data:any)=>{
    return request({
        url:"/api/User/Login",
        method:"post",
        params:data
    });
};

//手机号登录
export const PhoneLogin=async(data:any)=>{
    return request({
        url:"/captcha/validate",
        method:"get",
        params:data
    });
};


//用户列表
export const UserList=async(data:any)=>{
    return request({
        url:"/api/User/ShowUser",
        method:"get",
        params:data
    });
};

//用户删除
export const UserDelete=async(data:any)=>{
    return request({
        url:"/api/User/DeleteUser?IDNumber="+data,
        method:"delete",
    });
};

//用户编辑
export const UserUpdate=async(data:any)=>{
    return request({
        url:"/api/User/UpdateUser",
        method:"put",
        data
    });
};


//获取验证码
export const GetCode=async(data:any)=>{
    return request({
        url:"/captcha?id="+data,
        method:"get",
        responseType: 'blob'
    });
};